package com.demo.entity;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @类名称：Employee @类描述：
 * @创建人：YangChao
 * @创建时间：2017年9月13日 下午6:18:25
 * @version 1.0.0
 */
@Entity
@Table(name = "CRM_EMPLOYEE")
public class Employee extends BaseEntity {
	private static final long serialVersionUID = 1L;
	
	@Column(nullable=true, length=10)
	private String name;// 姓名
	private String empNumber;// 员工编号
	private Integer gender;// 性别
	private String birthday;// 生日
	private String email;// 邮箱
	private String phone;// 联系电话
	private String position;// 职位
	private String loginName;// 登录用户名
	private String passWord;// 登录密码
	private DepartMent departMent;// 所属部门

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmpNumber() {
		return empNumber;
	}

	public void setEmpNumber(String empNumber) {
		this.empNumber = empNumber;
	}

	public Integer getGender() {
		return gender;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassWord() {
		return passWord;
	}

	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "deptId")
	public DepartMent getDepartMent() {
		return departMent;
	}

	public void setDepartMent(DepartMent departMent) {
		this.departMent = departMent;
	}

}
